var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
/*
    装饰器是在方法属性类定义并执行前，进行额外功能的添加
    装饰器本身就是一个普通的方法
    当该方法以 @方式进行调用时，就变成了装饰器方法
    装饰器必须修饰一个变量、一个方法、一个class类型
*/
function dec(target) {
    console.log("装饰器", target);
    // target  就是被装饰的属性方法或者构造器
    target.age = "aaa";
}
var StuC = /** @class */ (function () {
    function StuC() {
        this.name = "名称";
        console.log("创建对象", this.name);
    }
    StuC = __decorate([
        dec
    ], StuC);
    return StuC;
}());
